GetConsumingEnumerable Method

Task Parallel System.Threading

Provides a consuming IEnumerable<(Of <(T>)>) for items in the collection.

Namespace:  System.Collections.Concurrent
Assembly:  System.Threading (in System.Threading.dll)

Syntax

Visual Basic (Declaration)
Public Function GetConsumingEnumerable As IEnumerable(Of T)
C#
public IEnumerable<T> GetConsumingEnumerable()

Return Value

An IEnumerable<(Of <(T>)>) that removes and returns items from the collection.

Exceptions

ExceptionCondition
System..::.ObjectDisposedExceptionThe BlockingCollection<(Of <(T>)>) has been disposed.

See Also